﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Flow_GetStyle_V2]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Flow_GetStyle_V2];
GO
CREATE PROCEDURE [dbo].[sproc_Flow_GetStyle_V2]
    @StyleID int = 0
AS
BEGIN
SET NOCOUNT ON;

IF @StyleID = 0
BEGIN
    -- get all styles
    SELECT * FROM dbo.UDS_Flow_Style;
END
ELSE
BEGIN
    SELECT * FROM dbo.UDS_Flow_Style WHERE Style_ID = @StyleID;
END

END
GO